package com.qf.business.feign.classes;

import com.qf.business.feign.fallback.ClsFeignFallback;
import com.qf.data.entity.Classes;
import com.qf.data.r.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * description: 班级服务调用的Feign接口
 * author: Ken
 * 公众号：Java架构栈
 */
@FeignClient(name = "qphone-classes", fallback = ClsFeignFallback.class)
public interface ClsFeign {

    /**
     * 根据班级id查询班级信息
     * @param cId
     * @return
     */
    @RequestMapping("/cls/getById")
    R<Classes> getClsByCid(@RequestParam("cId") Long cId);

    @RequestMapping("/cls/updateClsNums")
    R updateClsNums(@RequestParam("cid")Long cid, @RequestParam("nums")Integer nums, @RequestParam("type")Integer type);
}
